﻿<Window x:Class="LINQtoLDAPDemo_WPF.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mvvm="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.WPF4"
        Title="Sort Group Members" Height="297" Width="416">
    <Grid Height="253" Width="391">
        <!-- Group selection -->
        <TextBlock Height="23" HorizontalAlignment="Left" Margin="12,12,0,0" Name="textBlock1" Text="Group:" VerticalAlignment="Top" />
        <ComboBox ItemsSource="{Binding Path=Groups}" DisplayMemberPath="Name" Height="23" HorizontalAlignment="Left" Margin="54,12,0,0" 
            Name="cboGroups" VerticalAlignment="Top" Width="186" SelectionChanged="cboGroups_SelectionChanged" />
        
        <!-- Current page views -->
        <ListBox ItemsSource="{Binding Path=NonMembers}" DisplayMemberPath="DisplayName" Height="161" HorizontalAlignment="Left" 
            Margin="12,50,0,0" Name="lbNonMembers" VerticalAlignment="Top" Width="159" />
        <ListBox ItemsSource="{Binding Path=Members}" DisplayMemberPath="DisplayName" Height="161" HorizontalAlignment="Left" 
            Margin="220,50,0,0" Name="lbMembers" VerticalAlignment="Top" Width="159" />
        
        <!-- Add/Remove -->
        <Button Content="&gt;&gt;" Height="23" HorizontalAlignment="Left" Margin="177,107,0,0" Name="btnAdd" VerticalAlignment="Top" 
            Width="37" Click="btnAdd_Click" />
        <Button Content="&lt;&lt;" Height="23" HorizontalAlignment="Left" Margin="177,136,0,0" Name="btnRemove" VerticalAlignment="Top" 
            Width="37" Click="btnRemove_Click" />
        
        <!-- Non Member pages -->
        <Button Content="&lt;&lt;" Height="23" HorizontalAlignment="Left" Margin="16,218,0,0" Name="btnPrev" VerticalAlignment="Top" Width="28"
            Command="{Binding PreviousNonMemberPageCommand, Mode=OneTime}" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="50,216,0,0" Name="txtCurrentNonMemberPage" VerticalAlignment="Top" Width="29" 
            Text="{Binding NonMemberPageNum}" AcceptsReturn="False" />
        <Label Content="of" Height="28" HorizontalAlignment="Left" Margin="85,214,0,0" Name="label1" VerticalAlignment="Top" />
        <Label Content="{Binding TotalNonMemberPages, UpdateSourceTrigger=PropertyChanged}" Height="28" Margin="103,213,0,0"
            Name="lblTotalNonMemberPages" VerticalAlignment="Top" HorizontalAlignment="Left" Width="29" />
        <Button Content="&gt;&gt;" Height="23" HorizontalAlignment="Left" Margin="138,218,0,0" Name="btnNext" VerticalAlignment="Top" Width="29" 
            Command="{Binding NextNonMemberPageCommand, Mode=OneTime}" />
        
        <!-- Member pages -->
        <Button Command="{Binding PreviousMemberPageCommand, Mode=OneTime}" Content="&lt;&lt;" Height="23" HorizontalAlignment="Left" 
            Margin="224,219,0,0" Name="btnPrevMemberPage" VerticalAlignment="Top" Width="28" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="258,217,0,0" Name="txtCurrentMemberPage" Text="{Binding MemberPageNum}" 
            VerticalAlignment="Top" Width="29" AcceptsReturn="False" />
        <Label Content="of" Height="28" HorizontalAlignment="Left" Margin="293,215,0,0" Name="label3" VerticalAlignment="Top" />
        <Label Content="{Binding TotalMemberPages, UpdateSourceTrigger=PropertyChanged}" Height="28" HorizontalAlignment="Left" 
            Margin="311,214,0,0" Name="lblTotalMemberPages" VerticalAlignment="Top" Width="29" />
        <Button Command="{Binding NextMemberPageCommand, Mode=OneTime}" Content="&gt;&gt;" Height="23" HorizontalAlignment="Left" 
            Margin="346,219,0,0" Name="btnNextMemberPage" VerticalAlignment="Top" Width="29" />
    </Grid>
</Window>
